<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 300px;
      margin: 100px auto;
    }

    img {
      width: 300px;
      transition: all 2s;
    }

    .box {
      perspective: 1000px;
    }

    .box img:hover {
      transform: rotateY(60deg);
      transform: rotateY(-60deg);
    }
  </style>
</head>
<body>
  <div class="box">
    <img src="./images/hero.jpeg" alt="">
  </div>
</body>
</html>